FROM openjdk:11-jre-slim

ARG SERVICE_NAME

WORKDIR /app

# 复制Maven构建的jar包
COPY ${SERVICE_NAME}/target/${SERVICE_NAME}-*.jar app.jar

# 设置时区
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# 暴露端口
EXPOSE 8080 8081 8082 8083 8084

# 启动命令
ENTRYPOINT ["java", "-jar", "app.jar"]

